dojo.provide("lotex.form.Checkbox");

lotex.form.Checkbox.selectAllNone = function(checkbox) {
    lotex.form.Checkbox._selectAllNone(checkbox.checked);
}

lotex.form.Checkbox._selectAllNone = function(checked) {
    var cbs = document.body.getElementsByTagName("input");
    if(cbs != null){
        for (var i = 0; i < cbs.length; i++) {
            var cb = cbs[i];
            if (cb.name.indexOf("list_cb") == 0) {
                cb.checked = checked;
            }
        }
    }
}